#ifndef THREAD_POOLOld_H
#define THREAD_POOLOld_H 1



#include <utility>
#include <vector>

#include <iostream>
#include <queue>

#include <OpenThreads/Mutex>
#include <OpenThreads/Condition>
#include <OpenThreads/ScopedLock>

#include <OpenThreads/Thread>

class BlockQueue
{
public:
	BlockQueue()
	{
	
	}

	void add(int a)
	{
		OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_threadMutex);
		mQueue.push(a);
	}

	void pop()
	{
		OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_threadMutex);
		mQueue.pop();
	}

private:
	OpenThreads::Mutex _threadMutex;
	OpenThreads::Condition _cond;
	//OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_threadMutex);

	std::queue<int> mQueue;
};

class ThreadPool
{
public:
	ThreadPool()
	{

	}

	

public:
	std::vector<OpenThreads::Thread> mThreads;
};



#endif


